#ifndef MOTOR
#define MOTOR
#include "main.h"
#include "usart.h"
#include "FreeRTOS.h"
#include "task.h"

//going to need these if PINs are not defined in cubemx
// #define LF_A_GPIO_Port GPIOA
// #define LF_A_Pin GPIO_PIN_8
// #define LF_B_GPIO_Port GPIOC
// #define LF_B_Pin GPIO_PIN_8
// #define RT_A_GPIO_Port GPIOB
// #define RT_A_Pin GPIO_PIN_13
// #define RT_B_GPIO_Port GPIOB
// #define RT_B_Pin GPIO_PIN_14

void Mot_exec(int16_t pwm);
void Mot_exec_left(int16_t pwm);
void Mot_exec_right(int16_t pwm);

void Mot_stop_left(void);
void Mot_stop_right(void);

void Set_Left_MotorVoltageAndDirection(int16_t Pwm);
void Set_Right_MotorVoltageAndDirection(int16_t Pwm);
void Mot_init(TIM_HandleTypeDef* thr);

extern int16_t Set_Left_Speed;
extern int16_t Set_Right_Speed;

#endif
